/* ----------------------------------------------------------------------
*
* Copyright (C) 2025 XiaoFei. All rights reserved.
*
* $file:		XiaoFei_RTC.h
* $Date:        14-February-2025
* $Revision: 	V1
* $Project: 	XiaoFei BSP Library
*
* -------------------------------------------------------------------- */

#ifndef __XiaoFei_RTC_H
#define __XiaoFei_RTC_H

#define RTC_Freq			            32768
#define RTC_BKPDr			            BKP_DR1
#define RTC_BKPData		                0x1234

#ifndef BeiJingRTC_TypeDef_def
#define BeiJingRTC_TypeDef_def
typedef struct 
{
	unsigned short Year;        /*!< The year data of the Beijing time */
	unsigned char Month;        /*!< The month data of the Beijing time */
	unsigned char Day;          /*!< The day data of the Beijing time */
	unsigned char Hour;         /*!< The hour data of the Beijing time */
	unsigned char Minute;       /*!< The minute data of the Beijing time */
	unsigned char Second;       /*!< The second data of the Beijing time */
	unsigned short Milliscond;  /*!< The milliscond data of the Beijing time */
}BeiJingRTC_TypeDef;
#endif

/* 
* @function: 	XiaoFei_RTCInit
* @parameter:	[in] This					 Default value of initialization process.
* @parameter:	[in] Set					 Enable or disable of the value.
*/
void XiaoFei_RTCInit(BeiJingRTC_TypeDef* This, unsigned char Set);

/* 
* @function: 	XiaoFei_RTCGetTime
* @parameter:	[out] This					 The obtained time structure.
*/
void XiaoFei_RTCGetTime(BeiJingRTC_TypeDef* This);

#endif



